TimedAnimation

A time-based [class@Animation].

AdwTimedAnimation implements a simple animation interpolating the given value from [property@TimedAnimation:value-from] to [property@TimedAnimation:value-to] over [property@TimedAnimation:duration] milliseconds using the curve described by [property@TimedAnimation:easing].

If [property@TimedAnimation:reverse] is set to TRUE, AdwTimedAnimation will instead animate from [property@TimedAnimation:value-to] to [property@TimedAnimation:value-from], and the easing curve will be inverted.

The animation can repeat a certain amount of times, or endlessly, depending on the [property@TimedAnimation:repeat-count] value. If [property@TimedAnimation:alternate] is set to TRUE, it will also change the direction every other iteration.

Constructors

this
this(AdwTimedAnimation* adwTimedAnimation, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Widget widget, double from, double to, uint duration, AnimationTarget target)

Creates a new AdwTimedAnimation on @widget to animate @target from @from to @to.

Members

Functions

getAlternate
bool getAlternate()

Gets whether @self changes direction on every iteration.

getDuration
uint getDuration()

Gets the duration of @self.

getEasing
AdwEasing getEasing()

Gets the easing function @self uses.

getRepeatCount
uint getRepeatCount()

Gets the number of times @self will play.

getReverse
bool getReverse()

Gets whether @self plays backwards.

getStruct
void* getStruct()

the main Gtk struct as a void*

getTimedAnimationStruct
AdwTimedAnimation* getTimedAnimationStruct(bool transferOwnership)

Get the main Gtk struct

getValueFrom
double getValueFrom()

Gets the value @self will animate from.

getValueTo
double getValueTo()

Gets the value @self will animate to.

setAlternate
void setAlternate(bool alternate)

Sets whether @self changes direction on every iteration.

setDuration
void setDuration(uint duration)

Sets the duration of @self.

setEasing
void setEasing(AdwEasing easing)

Sets the easing function @self will use.

setRepeatCount
void setRepeatCount(uint repeatCount)

Sets the number of times @self will play.

setReverse
void setReverse(bool reverse)

Sets whether @self plays backwards.

setValueFrom
void setValueFrom(double value)

Sets the value @self will animate from.

setValueTo
void setValueTo(double value)

Sets the value @self will animate to.

Static functions

getType
GType getType()

Variables

adwTimedAnimation
AdwTimedAnimation* adwTimedAnimation;

the main Gtk struct

Inherited Members

From Animation

adwAnimation
AdwAnimation* adwAnimation;

the main Gtk struct

getAnimationStruct
AdwAnimation* getAnimationStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getState
AdwAnimationState getState()

Gets the current value of @self.

getTarget
AnimationTarget getTarget()

Gets the target @self animates.

getValue
double getValue()

Gets the current value of @self.

getWidget
Widget getWidget()

Gets the widget @self was created for.

pause
void pause()

Pauses a playing animation for @self.

play
void play()

Starts the animation for @self.

reset
void reset()

Resets the animation for @self.

resume
void resume()

Resumes a paused animation for @self.

skip
void skip()

Skips the animation for @self.

addOnDone
gulong addOnDone(void delegate(Animation) dlg, ConnectFlags connectFlags)

This signal is emitted when the animation has been completed, either on its own or via calling [method@Animation.skip].

Meta